<template>
    <div class="resource-manage">
        <div class="card-box">
            <div class="card-title">移交情况</div>
            <el-form class="form-wrap" size="small" >
                <el-form-item label="移交方式">
                    <el-col class="in_txt">{{dictCh(transferForm.transferType,'transfer_types')}}</el-col>
                </el-form-item>
                <el-form-item label="移交单位">
                    <el-col class="in_txt">{{transferForm.transferUnit}}</el-col>
                </el-form-item>
                <el-form-item label="移交时间">
                    <el-col class="in_txt">{{transferForm.receiveTime}}</el-col>
                </el-form-item>
                <el-form-item label="备注" class="full">
                    <el-col class="in_txt">{{transferForm.transferDesc}}</el-col>
                </el-form-item>
            </el-form>
        </div>
    </div>
</template>

<script>
    import { getDict } from '~/utils'
    export default {
        name: "transfer-info",
        data() {
            return {
                transferForm: {
                    transferType: '',
                    transferUnit: '',
                    receiveTime: '',
                    transferDesc: ''
                }

            }
        },
        methods: {
            dictCh(val, dictName){
                if(val && dictName){
                    let dict = getDict(dictName)
                    if(dict){
                        let find = dict.find(d => d.value == val)
                        if(find){
                            return find.label
                        }
                    }
                }
                return ""
            },
            initTransfer(data){
                let t_data = {
                    transferType: data.transferType,
                    transferUnit: data.transferUnit,
                    receiveTime: data.receiveTime,
                    transferDesc: data.transferDesc
                }
               this.transferForm = t_data
            },
        }
    }
</script>

<style scoped lang='scss'>
    

    @include formWrap(4);
    .in_txt {
        color: #999999;
    }
</style>
